local skel = fk.CreateSkill{
  name = "div_heg__yumou",
  tags = { Skill.Compulsory }
}
local H = require "packages/hegemony/util"
---@type TrigSkelSpec<DeathTrigFunc>
local yumou = {
  anim_type = "special",
  can_trigger = function(self, event, target, player, data)
    if player ~= target and player:hasSkill(self) and data.damage.from then
      local killer = data.damage.from
      return not H.compareKingdomWith(target, killer) and killer ~= player
    elseif player == target and player:hasSkill(self, false, true) and data.damage.from then
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    if player ~= target then
      player:drawCards(1, self.name)
    else
      return true
    end
  end,
}
skel:addEffect(fk.Deathed, yumou)
return skel